package com.my.mybatis.classDao;

import com.my.mybatis.entity.User;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * @Author:wangbin.
 * @Description.
 * @Date:Created in 17:55 2017/9/7.
 * @Modified By:
 */
@Repository
public class UserDaoClass {

    @Resource
    private SqlSessionTemplate sqlSessionTemplate;

    public User getUser(int id) {
        return this.sqlSessionTemplate.selectOne(this.getClass().getName() + ".getUser", id);
    }
}
